{extend name="admin@index_layout"/}
{block name="main"}
<form class="layui-form" method="post">
    <input type="hidden" name="id" value="{$data.id}" />


    <div class="layui-form-item">
        <label class="layui-form-label">名称</label>
        <div class="layui-input-block">
            <input type="text" name="row[name]" value="{$data.name}" autocomplete="off"  lay-verify="required" placeholder="名称" class="layui-input">
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">价格</label>
        <div class="layui-input-block">
            <input type="number" name="row[price]" value="{$data.price}" autocomplete="off" lay-verify="required|priceNum" placeholder="价格" class="layui-input">
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">标签</label>
        <div class="layui-input-block">
            {:Form::text('row[tag]',$data.tag,["class"=>"form-tags","lay-verify"=>"required"])}
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">简介</label>
        <div class="layui-input-block">
            <textarea name="row[desc]"   placeholder="请输入内容" class="layui-textarea">{$data.desc} </textarea>
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">派单方式</label>
        <div class="layui-input-block" id="dispatch_type">

            <input type="radio" name="row[dispatch_type]" value="1" {if $data.dispatch_type==1}checked{/if} title="大厅可接单">

            <input type="radio" name="row[dispatch_type]" value="2" {if $data.dispatch_type==2}checked{/if} title="后台派单">

        </div>
    </div>

<!--    <div class="layui-form-item">-->
<!--        <label class="layui-form-label">可派遣人员</label>-->
<!--        <div class="layui-input-block" id="server_type">-->

<!--            <input type="radio" name="row[server_type]" value="1"  {if $data.server_type==1}checked{/if}  title="陪诊员/护士">-->

<!--            <input type="radio" name="row[server_type]" value="2"  {if $data.server_type==2}checked{/if}  title="护士">-->

<!--&lt;!&ndash;            <input type="radio" name="row[server_type]" value="3"  {if $data.server_type==3}checked{/if}  title="都可接单">&ndash;&gt;-->

<!--        </div>-->
<!--    </div>-->

    <div class="layui-form-item">
        <label class="layui-form-label">排序</label>
        <div class="layui-input-block">
            <input type="text" name="row[sort]" value="{$data.sort}" lay-verify="required|number" autocomplete="off" placeholder="排序"
                   class="layui-input">
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">图标</label>
        <div class="layui-input-block">
            <input value="{$data.icon_img}"  type="text" lay-verify="required" name="icon_img" id="c-pic" value="" class="layui-input">
        </div>
        <div class="layui-input-block">
            <button type="button" class="layui-btn faupload" id="faupload-pic" data-multiple="false"
                    data-input-id="c-pic"
                    data-preview-id="p-pic" data-type="image"><i class="layui-icon layui-icon-upload"></i> 上传
            </button>
            <button type="button" class="layui-btn fachoose" data-multiple="false" data-mimetype="image"
                    data-input-id="c-pic" id="fachoose-c-pic"><i class="iconfont icon-other"></i> 选择
            </button>
            <ul class="layui-row list-inline plupload-preview" id="p-pic"></ul>
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">背景url</label>
        <div class="layui-input-block">
            <input value="{$data.bc_img}" type="text" lay-verify="required" name="bc_img" id="bc_img" value="" class="layui-input">
        </div>
        <div class="layui-input-block">
            <button type="button" class="layui-btn faupload" id="faupload-bc_img" data-multiple="false"
                    data-input-id="bc_img"
                    data-preview-id="bc_img2" data-type="image"><i class="layui-icon layui-icon-upload"></i> 上传
            </button>
            <button type="button" class="layui-btn fachoose" data-multiple="false" data-mimetype="image"
                    data-input-id="bc_img" id="fachoose-bc_img"><i class="iconfont icon-other"></i> 选择
            </button>
            <ul class="layui-row list-inline plupload-preview" id="bc_img2"></ul>
        </div>
    </div>

    <div class="layui-form-item" style="">
        <label class="layui-form-label">内容详情</label>
        <div class="layui-input-block">
            <script type="text/plain" class="js-ueditor" name="content"
                    style="width:850px;height:200px;position: relative;z-index: 1 !important;"
                    id="content">{$data.detail|raw}</script>
        </div>
    </div>

    <div class="layui-form-item" style="">
        <label class="layui-form-label">服务须知</label>
        <div class="layui-input-block">
            <script type="text/plain" class="js-ueditor" name="service_notice"
                    style="width:850px;height:200px;position: relative;z-index: 1 !important;"
                    id="service_notice">{$data.service_notice|raw}</script>
        </div>
    </div>



    <div class="layui-form-item layer-footer">
        <div class="layui-input-block">
            <button class="layui-btn" lay-submit>提交</button>
        </div>
    </div>
</form>
{/block}
{block name="script"}
<script type="text/javascript">
    layui.use(['yznForm', 'laydate'], function () {
        var yznForm = layui.yznForm,
            laydate = layui.laydate;
        yznForm.bindevent($("form.layui-form"));
        laydate.render({
            elem: '#ID-laydate'
        });
    });
</script>
{/block}